Redmine instalacja - Debian 10 Kategoria: WWW | Tagi: redmine | Autor: Bartłomiej Gałęzia

Required packages

aptitude install build-essential ruby-dev libxslt1-dev libmariadb-dev libxml2-dev zlib1g-dev imagemagick libmagickwand-dev curl vim sudo apache2 libapache2-mod-passenger ufw subversion mariadb-server mariadb-client
aptitude install php php-mysql # jeśli potrzebujemy php do phpmyadmin lub adminer

Test

ruby -v
useradd -r -m -d /opt/redmine -s /usr/bin/bash redmine
usermod -aG redmine www-data

Database

mysql -u root -p
create database redminedb;
grant all on redminedb.* to redmineuser@localhost identified by 'P@ssW0rD';
flush privileges;
quit

Redmine files

wget http://www.redmine.org/releases/redmine-4.2.2.tar.gz -P /tmp/
sudo -u redmine tar xzf /tmp/redmine-4.2.2.tar.gz -C /opt/redmine/ --strip-components=1

Redmine config

su - redmine
cp /opt/redmine/config/configuration.yml{.example,}
cp /opt/redmine/public/dispatch.fcgi{.example,}
cp /opt/redmine/config/database.yml{.example,}
vim /opt/redmine/config/database.yml
...
production:
  adapter: mysql2
  database: redminedb
  host: localhost
  username: redmineuser
  password: "P@ssW0rD"
  encoding: utf8
...
exit #logout user redmine
cd /opt/redmine
sudo gem install bundler
su - redmine
bundle install --without development test --path vendor/bundle
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data
exit

Test

sudo ufw allow 3000/tcp
cd /opt/redmine
sudo bundle exec rails server webrick -e production

Apache config

vim /etc/apache2/sites-available/redmine.conf
Listen 3000
<VirtualHost *:3000> 
ServerName redmine.domain.com
RailsEnv production
DocumentRoot /opt/redmine/public

 <Directory "/opt/redmine/public"> 
Allow from all 
Require all granted 
</Directory> 

ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined
</VirtualHost>
apachectl configtest
apache2ctl -M | grep -i passenger

Enable module and website

a2enmod passenger
a2ensite redmine
systemctl reload apache2

http://hostname.domain.com:3000/

Żeby działało na porcie 80

a2dissite 000-default
vim /etc/apache2/sites-available/redmine.conf
#Listen 3000
<VirtualHost *:80> 
service apache2 restart

Źródło: https://kifarunix.com/install-redmine-with-mariadb-on-debian-10-buster/

Dodaj komentarz

Brak komentarzy, bądź pierwszy i dodaj swój komentarz